home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games: Greatest Hits 1996
/
Amiga Games: Greatest Hits 1996.iso
/
rexx
/
showfile.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-09-14
|
2KB
|
65 lines
/* This AREXX program is used to show an external file using multiview of OS3
The rexx file is called from the Database program Twist with the arguments
showfilename multiviewportname pubscreenname
SHOWFILENAME: The name of the file to show. ::CLIP is used if the clipboard must be shown.
MULTIVIEWPORTNAME: The name of the Multiview AREXX port. Each "external file object" in
a databases record form addresses a different port so more than one instance
of Multiview may be started from Twist
PUBSCREENNAME: The name of the screen Twist is running on (Workbench, Twist or another
public screen)
If Multiview is not available Display is used
Copyright (C) 1994 Mermaid Group
*/
PARSE ARG showfilename,multiviewportname,pubscreenname
multiviewportname = upper(multiviewportname)
/* get kickstart version from previous call to this script */
ksvs = getclip("TwistMWVS")
if ksvs == "" then
do
/* use the shell command to find if the OS version supports DataType and Multiview */
ADDRESS command "version >T:version_string"
call open 'input','T:version_string','R'
vsline = readln('input')
call close 'input'
address command 'delete quiet T:version_string'
PARSE VAR vsline "Kickstart " ksvs ",".
setclip("TwistMWVS", ksvs)
end
if ksvs < 40 then
multiviewportname = "MULTIVIEW.1"
IF ~ SHOW('p', multiviewportname) THEN
DO
/* Multiview with the named port is not currently existing so create it */
IF showfilename = "-c" THEN filetext = "CLIPBOARD"
ELSE filetext = "FILE " showfilename
IF ksvs >= 39 then
do
if ksvs >= 40 then ADDRESS command "run >NIL: sys:utilities/multiview " filetext " PORTNAME " multiviewportname " PUBSCREEN " pubscreenname
else
do
/* The Multiview vs 3.0 on C4000 and C1200 does not know the PORTNAME option - thus only one file can be shown at a time */
ADDRESS command "run >NIL: sys:utilities/multiview " filetext " PUBSCREEN " pubscreenname
end
end
else address command "sys:utilities/display " showfilename " opt t=3"
END
ELSE
DO
/* Multiview with the named port is already running. send it a AREXX command to show this file */
ADDRESS VALUE multiviewportname
IF showfilename = "-c" THEN OPEN CLIPBOARD
ELSE OPEN NAME showfilename
WINDOWTOFRONT
END
EXIT